package com.yongbao.model.dtomapper;

import com.yongbao.model.domain.RoleDO;
import com.yongbao.model.request.RoleRequest;
import com.yongbao.model.vo.RoleVO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * @author zhanghong
 */
@Mapper(componentModel = "spring")
public interface RoleDtoMapper {

    RoleDtoMapper INSTANCE = Mappers.getMapper(RoleDtoMapper.class);

    /**
    * DO to VO
    * @param roleDO
    * @return
    */
    RoleVO do2VO(RoleDO roleDO);

    /**
     * request to DO
     * @param request
     * @return
     */
    RoleDO request2DO(RoleRequest request);
}
